package com.cn.bulu.service;

import com.cn.bulu.pojo.Customer;
import com.cn.bulu.pojo.Customer_address;
import com.cn.bulu.pojo.Dictionary;
import com.cn.bulu.pojo.Evaluation;
import com.cn.bulu.utils.BuluResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.Map;

public interface CustomerService {
	//注册
	public BuluResult register(String nickName,/*String phone,String passWord*/String account,String referrer,String gender);//refer指的是什么
	//判断手机号是否已经存在
	public BuluResult isPhone(String phone);//BuluResult
	//顾客登录
	public BuluResult login(/*String phone, String password*/String account,HttpServletRequest request);
	//修改密码
	public BuluResult updatePassword(String account);//修改密码的时候啊传入手机号是为了获取验证码和输入新的密码
	//安装房间具体位置获取
	public BuluResult getLocation();//具体位置的获取是怎么获取的
	/**
	 * 添加购物车根据业务逻辑的改变进行修改
	 *xiaGuanghui 2017年5月25日 下午4:50:17 
	 *@param request
	 *@param goodsList
	 *@return
	 */
	public BuluResult addCar(HttpServletRequest request,String goodsList);//goodList是商品的序列号还是产品的编号
	//点击加入收藏
	public BuluResult addCollect(HttpServletRequest request, String sampleIdS);//加入收藏的时候传的是商品的id
	//展示购物车
	public BuluResult showCar(HttpServletRequest request);
	//删除购物车中的产品
	public BuluResult deleteCar(String carIds);//carIds？
	//把全是配件的购物车生成一个order
	public BuluResult insertOrderOfNoIndent(HttpServletRequest request, String goods);
	//展示所有默认收货地址
	public BuluResult showAllAddress(HttpServletRequest request);
	//新增收货地址
	public BuluResult addNewAddress(HttpServletRequest request, Customer_address customer_address);
	//更改默认收货地址
	public BuluResult updateDefaultAddress(HttpServletRequest request, Integer cuAdId);
	//把购物车中的产品生成订单(不全是配件)
	public BuluResult insertIndent(HttpServletRequest request, String goods);
	//计算当前选择商品需要交付的定金
	public BuluResult requestEarnest(HttpServletRequest request, String curtainNum,String city);
	//修改头像
	public BuluResult updateHeadImg(HttpServletRequest request, String headImg);
	//修改用户信息
	public BuluResult updateUserInfo(HttpServletRequest request);
	//展示优惠卷
	public BuluResult showCoupons(HttpServletRequest request);
	//使用优惠卷
	public BuluResult useCoupons(HttpServletRequest request, Integer couponsId);
	//版本介绍
	public BuluResult setting();
	//点击进行中
	public BuluResult clickGoing(HttpServletRequest request,int types);
	//根据测量订单号得到所有的id
	public BuluResult getGoodsByIndentId(HttpServletRequest request,Integer indentId);
	//把测量订单删除变成已取消的订单
	public BuluResult updateIndentByIndentId(HttpServletRequest request, Integer indentId);
	//点击已取消
	public BuluResult clickCancel(HttpServletRequest request);
	//已取消改成重新购买
	public BuluResult reBuyIndent(HttpServletRequest request, Integer indentId);
	//重选款式
	public BuluResult updateGoodOfIndent(HttpServletRequest request, String goodsId,String sampleId );

	//测量单,转换成orders
	public BuluResult indentToOrders(HttpServletRequest request, String good);
	//选配件, 添加到indent
	public BuluResult addGoodsOfAcc(HttpServletRequest request, Integer sampleId,Integer indentId,Integer goodsId,Integer accId,Integer whatStructure);
	//点击展示收藏
	public BuluResult selectCollect(HttpServletRequest request);
	//点击删除收藏
	public BuluResult deleteCollect(HttpServletRequest request, String sampleIdS);
	//点击查询待评价
//	public BuluResult NoEvaluation(HttpServletRequest request);
	//待评价页面点击某个订单
	public BuluResult GoEvaluation(Integer indentId);
	//查询已完成订单
	public BuluResult clickOver(HttpServletRequest request);
	//删除该商品的其中一个配件
	public BuluResult deleteAccOfGoodOfIndent(HttpServletRequest request, Integer goodsId, Integer accId);
	//点击已付款
	public BuluResult clickAlreadyPay(HttpServletRequest request);
	//通过订单号得到所有商品的详情
	public BuluResult getGoodsByOrderId(Integer indentId);
	//已付款中取消订单
	public BuluResult cancelOrders(HttpServletRequest request, Integer orderId);
	
	public BuluResult cancelIndent(HttpServletRequest request, Integer indentId,Integer type);
	//点击待安装
	public BuluResult clickNoInstall(HttpServletRequest request);
	//已付款中确认收货
	public BuluResult confirmReceipt(HttpServletRequest request,String parame);
	public BuluResult insertInstallIndent(HttpServletRequest request, Integer orderId, Date date,Integer cuAdId,Integer isAZ);
	//添加评价
//	public BuluResult submitEvaluation(HttpServletRequest request, Integer goodsId, String workerEvation, String content,
//			Integer star1,Integer sampleId, String imgs);
	
	//根据用户使用了优惠卷,减掉订单的价钱
	public BuluResult updateOrderPriceByUseCoupons(HttpServletRequest request, Integer orderId, Integer couponsId);
	//付测量费
	public BuluResult payMeasureMoney(HttpServletRequest request, Integer indentId);
	//查询顾客信息
	public BuluResult selectCustomerX(HttpServletRequest request);
	//删除地址
	public BuluResult deleteAddress(HttpServletRequest request,Integer cuAdId);
	//待安装中点击确认安装
	public BuluResult installComplete(Integer indentId);
	//修改地址接口
	public BuluResult chageAddress(Customer_address customer_address);
	//进入我的页面
	public BuluResult Mypage(HttpServletRequest request);
	//顾客申请售后
	public BuluResult insertAfterSales(HttpServletRequest request, Integer goodsId, String problem, String imgs);
	//查看商品售后
	public BuluResult selectAfterSales(Integer goodsId);
	//搜索配件
	public BuluResult selectPeijian(Integer accessoriesTypeId,Integer page);
	//修改配件米数数量
	public BuluResult updatePeijian(String peijian);
	//提交问题反馈
	public BuluResult insertProblem(HttpServletRequest request, String problemCount, String imgs);
	//查询顾客应支付的定金
	public BuluResult selectDingjing(String city);
	//查询工人信息
	public BuluResult selectWorkerX(Integer indentId);
	//顾客未支付测量定金点击返回
	public BuluResult deleteIndentG(Integer indentId);
	public Customer getCustomerById(Integer customerId);
	public Integer InsertCustomerByPhone(String phone,String referrer);
	//根据是什么配件查询可用配件类型
	public BuluResult selectLihaibu(Integer whatStructure,Integer accessoriesTypeId,Integer page);
	//查询顾客钱包
	public BuluResult selectWallet(HttpServletRequest request);
	//查询绑定情况
	public BuluResult selectBangding(HttpServletRequest request);
	//查询顾客金钱明细
	public BuluResult selectMingxi(HttpServletRequest request,Integer page);
	//添加银行卡
	public BuluResult insertYinhangka(HttpServletRequest request,String bankName,String boundBank,String bankNumber);
	//添加支付宝
	public BuluResult insertZhifubao(HttpServletRequest request, String baoName, String zhifubao);
	//添加微信
	public BuluResult insertWeixin(HttpServletRequest request, String xinName, String weixin);
	//购物车生成order后取消  删除order
	public BuluResult callbackOrder(HttpServletRequest request, Integer orderId);
	//已完成中生成安装订单
	public BuluResult insertAzhuang(HttpServletRequest request, String goodIds);
	//查询物流
	public BuluResult selectWuliu(Integer orderId);
	//查询app启动广告
	public BuluResult selectGuanggao();
	
	public BuluResult banlancePayment(HttpServletRequest request,Map<String,String>parames);
//	public BuluResult clickPaying(HttpServletRequest request);
	
	
	// 根据商品号查询商品信息
	public BuluResult selectGoodxinxi(Integer goodsId);
	//添加评价
	public BuluResult submitEvaluation(HttpServletRequest request, Evaluation evaluation, String imgs, String goodsId);

	
//	public BuluResult alipayResult(HttpServletRequest request);

	// 顾客提现到支付宝
	public BuluResult alipyWithdrawal(HttpServletRequest request, Double money, String zhifubao, String name,
				String password, Integer status);

	
	//查询商品添加页面参数
	public	BuluResult addSampleParam();
	
	//字典表新属性的添加
	public	BuluResult dic_insert(Dictionary dictionary);
	
	//查询字典表细分参数数据
	public	BuluResult selectDictionarybyParam(Map<String,Object> map);
	//商品添加
	public	BuluResult insert_Sample();
	//重选的款式产品列表
	public BuluResult selectSamplesOfStyles(HttpServletRequest request, Map<String, Object> parames);
	//重选款式
	public BuluResult reselectStyle(HttpServletRequest request, Map<String, Object> parames);
	//充值
	public BuluResult recharge(HttpServletRequest request, Double money, Integer method,String alipayAccount);

	public String  getQRCode(HttpServletRequest request);

	public BuluResult alipayMoney(HttpServletRequest  request,Integer indentId, Double moeny,Integer type);
	
	public BuluResult subordinate(HttpServletRequest request, HttpSession session,String account, String vertifyCode,Integer customerId,Integer identity);
	
	public BuluResult recordUserAndCustomer(HttpServletRequest request, HttpSession session, String phone, String vertifyCode,Integer customerId);
	
	public BuluResult isReigister(String userName);
	public BuluResult registWeb(HttpSession session, String nickName, String phone, String password, String referrer,
			String gender,Integer identity) throws Exception;
	public Customer getCurrentLoggingCustomer(HttpServletRequest request);
	Map<String,Object> isCustomerOrdered(Integer indentId);
}
